package com.gc.server.controller.api;

import com.gc.server.entity.DicTypeEntity;
import com.gc.server.service.DicTypeService;
import com.yf.response.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/dic")
public class ApiDicController {

    @Autowired
    private DicTypeService typeService;

    @GetMapping("/type")
    private R index(String name){
      List<DicTypeEntity> list =  typeService.findByName(name);
      return R.ok(list);
    }

}
